package com.rybbaby.tss.front.tssClasses.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.rybbaby.tss.front.tssClassRoom.entity.TssClassRoom;
import com.rybbaby.tss.front.tssCourse.entity.TssCourse;
import com.rybbaby.tss.platform.sysAdminUser.entity.SysAdminUser;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @description 班级表
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-09 下午11:50:14
 */
@Entity
@Table(name = "tss_classes")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TssClasses implements Serializable {
	
	private static final long serialVersionUID = 53161775585052L;
	
	/** 主键 **/
	private String id;

	/**
	 * 班级名称
	 */
	private String name;
	/** 课程类型 **/
	private Integer type;
	/** 课程名称Id **/
	private String courseId;
	/** 周几上课 **/
	private String weekDay;
	/** 上课开始时间 **/
	private java.sql.Time startTime;
	/** 上课截止时间 **/
	private java.sql.Time endTime;
	/** 班级起始时间 **/
	private Date startDate;
	/** 班级截止时间 **/
	private Date endDate;
	/** 上课教室Id **/
	private String roomId;
	/** 授课老师Id **/
	private String empAdminUserId;
	/** 单节消耗课时 **/
	private Integer expendClassHour;
	/** 课时背景颜色 **/
	private String bgColor;
	/** 课程节数 **/
	private Integer pitchNumber;
	/** 剩余课程节数 **/
	private Integer surplusPitchNumber;
	/** 当前操作者id **/
	private String adminUserId;
	/** 班级变动时间 **/
	private java.sql.Timestamp changeTime;
	/** 状态 **/
	private Integer satus;

	/**
	 * 课程性质 (1全日 2全日)
	 */
	private Integer natrue;

	private Boolean isBlockUp;

	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 修改时间 **/
	private java.sql.Timestamp updateTime;
	/** 版本 **/
	private Integer version;

	/**
	 * 学期
	 */
	private Integer  semester;


	/**
	 * 教室信息
	 */
	@JsonIgnore
	private TssClassRoom tssClassRoom;
	/**
	 * 课程信息
	 */
	@JsonIgnore
	private TssCourse tssCourse;

	/**
	 * 教职员工
	 */
	@JsonIgnore
	private SysAdminUser empSysAdminUser;

	/**
	 * 用户信息
	 */
	@JsonIgnore
	private SysAdminUser sysAdminUser;

	/**
	 * 方法: 取得主
	 *
	 * @return java.lang.String 主键
	 */
	@Id
	@GeneratedValue(generator = "tss_classesIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "tss_classesIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 32)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得课程类型
	 *
	 * @return java.lang.Integer 课程类型
	 */
	@Column(name = "type", nullable= true, length = 11)
	public Integer getType() {
		return this.type;
	}
	
	/**
	 * 方法: 设置课程类型
	 *
	 * @param type 课程类型
	 */
	public void setType(Integer type) {
		this.type = type;
	}
	
	/**
	 * 方法: 取得课程名称Id
	 *
	 * @return java.lang.String 课程名称Id
	 */
	@Column(name = "courseId", nullable= true, length = 32)
	public String getCourseId() {
		return this.courseId;
	}
	
	/**
	 * 方法: 设置课程名称Id
	 *
	 * @param courseId 课程名称Id
	 */
	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}
	
	/**
	 * 方法: 取得周几上课
	 *
	 * @return java.lang.Integer 周几上课
	 */
	@Column(name = "weekDay", nullable= true, length = 100)
	public String getWeekDay() {
		return this.weekDay;
	}
	
	/**
	 * 方法: 设置周几上课
	 *
	 * @param weekDay 周几上课
	 */
	public void setWeekDay(String weekDay) {
		this.weekDay = weekDay;
	}
	
	/**
	 * 方法: 取得上课开始时间
	 *
	 * @return java.sql.Time 上课开始时间
	 */
	@Column(name = "startTime", nullable= true, length = 10)
	public java.sql.Time getStartTime() {
		return this.startTime;
	}
	
	/**
	 * 方法: 设置上课开始时间
	 *
	 * @param startTime 上课开始时间
	 */
	public void setStartTime(java.sql.Time startTime) {
		this.startTime = startTime;
	}
	
	/**
	 * 方法: 取得上课截止时间
	 *
	 * @return java.sql.Time 上课截止时间
	 */
	@Column(name = "endTime", nullable= true, length = 10)
	public java.sql.Time getEndTime() {
		return this.endTime;
	}
	
	/**
	 * 方法: 设置上课截止时间
	 *
	 * @param endTime 上课截止时间
	 */
	public void setEndTime(java.sql.Time endTime) {
		this.endTime = endTime;
	}
	
	/**
	 * 方法: 取得班级起始时间
	 *
	 * @return java.sql.Timestamp 班级起始时间
	 */
	@Column(name = "startDate", nullable= true, length = 10)
	public Date getStartDate() {
		return this.startDate;
	}

	/**
	 * 方法: 设置班级起始时间
	 *
	 * @param startDate 班级起始时间
	 */
	public void setStartDate(java.util.Date startDate) {
		this.startDate = startDate;
	}
	
	/**
	 * 方法: 取得班级截止时间
	 *
	 * @return java.sql.Timestamp 班级截止时间
	 */
	@Column(name = "endDate", nullable= true, length = 10)
	public Date getEndDate() {
		return this.endDate;
	}
	
	/**
	 * 方法: 设置班级截止时间
	 *
	 * @param endDate 班级截止时间
	 */
	public void setEndDate(java.util.Date endDate) {
		this.endDate = endDate;
	}
	
	/**
	 * 方法: 取得上课教室Id
	 *
	 * @return java.lang.String 上课教室Id
	 */
	@Column(name = "roomId", nullable= true, length = 32)
	public String getRoomId() {
		return this.roomId;
	}
	
	/**
	 * 方法: 设置上课教室Id
	 *
	 * @param roomId 上课教室Id
	 */
	public void setRoomId(String roomId) {
		this.roomId = roomId;
	}
	
	/**
	 * 方法: 取得授课老师Id
	 *
	 * @return java.lang.String 授课老师Id
	 */
	@Column(name = "empAdminUserId", nullable= true, length = 32)
	public String getEmpAdminUserId() {
		return this.empAdminUserId;
	}
	
	/**
	 * 方法: 设置授课老师Id
	 *
	 * @param empAdminUserId 授课老师Id
	 */
	public void setEmpAdminUserId(String empAdminUserId) {
		this.empAdminUserId = empAdminUserId;
	}
	
	/**
	 * 方法: 取得单节消耗课时
	 *
	 * @return java.lang.Integer 单节消耗课时
	 */
	@Column(name = "expendClassHour", nullable= true, length = 11)
	public Integer getExpendClassHour() {
		return this.expendClassHour;
	}
	
	/**
	 * 方法: 设置单节消耗课时
	 *
	 * @param expendClassHour 单节消耗课时
	 */
	public void setExpendClassHour(Integer expendClassHour) {
		this.expendClassHour = expendClassHour;
	}
	
	/**
	 * 方法: 取得课时背景颜色
	 *
	 * @return java.lang.String 课时背景颜色
	 */
	@Column(name = "bgColor", nullable= true, length = 12)
	public String getBgColor() {
		return this.bgColor;
	}
	
	/**
	 * 方法: 设置课时背景颜色
	 *
	 * @param bgColor 课时背景颜色
	 */
	public void setBgColor(String bgColor) {
		this.bgColor = bgColor;
	}
	
	/**
	 * 方法: 取得课程节数
	 *
	 * @return java.lang.Integer 课程节数
	 */
	@Column(name = "pitchNumber", nullable= true, length = 11)
	public Integer getPitchNumber() {
		return this.pitchNumber;
	}
	
	/**
	 * 方法: 设置课程节数
	 *
	 * @param pitchNumber 课程节数
	 */
	public void setPitchNumber(Integer pitchNumber) {
		this.pitchNumber = pitchNumber;
	}
	
	/**
	 * 方法: 取得当前操作者id
	 *
	 * @return java.lang.String 当前操作者id
	 */
	@Column(name = "adminUserId", nullable= true, length = 32)
	public String getAdminUserId() {
		return this.adminUserId;
	}
	
	/**
	 * 方法: 设置当前操作者id
	 *
	 * @param adminUserId 当前操作者id
	 */
	public void setAdminUserId(String adminUserId) {
		this.adminUserId = adminUserId;
	}
	
	/**
	 * 方法: 取得班级变动时间
	 *
	 * @return java.sql.Timestamp 班级变动时间
	 */
	@Column(name = "changeTime", nullable= true)
	public java.sql.Timestamp getChangeTime() {
		return this.changeTime;
	}
	
	/**
	 * 方法: 设置班级变动时间
	 *
	 * @param changeTime 班级变动时间
	 */
	public void setChangeTime(Timestamp changeTime) {
		this.changeTime = changeTime;
	}
	
	/**
	 * 方法: 取得状态
	 *
	 * @return java.lang.Integer 状态
	 */
	@Column(name = "satus", nullable= true, length = 11)
	public Integer getSatus() {
		return this.satus;
	}
	
	/**
	 * 方法: 设置状态
	 *
	 * @param satus 状态
	 */
	public void setSatus(Integer satus) {
		this.satus = satus;
	}
	
	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime", nullable= true, length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime 创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 方法: 取得修改时间
	 *
	 * @return java.sql.Timestamp 修改时间
	 */
	@Column(name = "updateTime", nullable= true, length = 19)
	public java.sql.Timestamp getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * 方法: 设置修改时间
	 *
	 * @param updateTime 修改时间
	 */
	public void setUpdateTime(java.sql.Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
	 * 方法: 取得选班人数
	 *
	 * @return java.lang.Integer 选班人数
	 */
    @Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return this.version;
	}

	/**
	 * 教室
	 * @param version
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}

	@JoinColumn(name = "roomId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = TssClassRoom.class)
	public TssClassRoom getTssClassRoom() {
		return tssClassRoom;
	}

	public void setTssClassRoom(TssClassRoom tssClassRoom) {
		this.tssClassRoom = tssClassRoom;
	}

	/**
	 * 课程
	 * @return
	 */
	@JoinColumn(name = "courseId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = TssCourse.class)
	public TssCourse getTssCourse() {
		return tssCourse;
	}

	public void setTssCourse(TssCourse tssCourse) {
		this.tssCourse = tssCourse;
	}

	/**
	 * 获取班级名称
	 * @return
	 */
	@Column(name = "name", nullable= true, length = 50)
	public String getName() {
		return name;
	}

	/**
	 * 设置班级名称
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	@JoinColumn(name = "empAdminUserId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
	public SysAdminUser getEmpSysAdminUser() {
		return empSysAdminUser;
	}

	public void setEmpSysAdminUser(SysAdminUser empSysAdminUser) {
		this.empSysAdminUser = empSysAdminUser;
	}

	@Column(name = "natrue", nullable= true, length = 11)
	public Integer getNatrue() {
		return natrue;
	}

	public void setNatrue(Integer natrue) {
		this.natrue = natrue;
	}

	@Column(name = "surplusPitchNumber", nullable= true, length = 11)
	public Integer getSurplusPitchNumber() {
		return surplusPitchNumber;
	}

	public void setSurplusPitchNumber(Integer surplusPitchNumber) {
		this.surplusPitchNumber = surplusPitchNumber;
	}


	/**
	 * 获取用户信息
	 * @return
	 */
	@JoinColumn(name = "adminUserId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
	public SysAdminUser getSysAdminUser() {
		return sysAdminUser;
	}

	public void setSysAdminUser(SysAdminUser sysAdminUser) {
		this.sysAdminUser = sysAdminUser;
	}


	@Column(name = "isBlockUp", nullable = true, length = 1)
	public Boolean getIsBlockUp() {
		return this.isBlockUp;
	}

	public void setIsBlockUp(Boolean isBlockUp) {
		this.isBlockUp = isBlockUp;
	}

	@Column(name = "semester", nullable = true, length = 11)
	public Integer getSemester() {
		return semester;
	}

	public void setSemester(Integer semester) {
		this.semester = semester;
	}
}